<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>管理员-头部</title>
    <link href="/static/bootstrap/css/bootstrap.css" rel="stylesheet"/>
    <link href="/static/css/admin/base.css" rel="stylesheet"/>
</head>
<body>
<%-- 方便ajax获取APP_PATH --%>
<input id="session_userid" type="hidden" value="${user.userId}">
<input id="session_username" type="hidden" value="${user.userName}">
<input id="session_email" type="hidden" value="${user.userEmail}">
<input id="session_userPhoto" type="hidden" value="${user.userPhoto}">
<input id="session_aname" type="hidden" value="${user.userName}">
<input id="session_acreateTime" type="hidden" value="${user.userCreateTime}">

<div class="container-fluid">
    <nav class="navbar navbar-default row no-yj  navbar-fixed-top">
        <div class="container-fluid">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed"
                        data-toggle="collapse" data-target="#nav-list-left"
                        aria-expanded="false">
                    <span class="sr-only">切换导航</span> <span
                        class="icon-bar"></span> <span class="icon-bar"></span> <span
                        class="icon-bar"></span>
                </button>
            </div>

            <%-- 用户端 --%>
            <div>
                <ul class="nav navbar-nav">
                    <li>
                        <a href="/admin/index" style="height: 50px">
                            <span>刷新页面</span>
                        </a>
                    </li>
                    <li>
                        <a href="/index" style="height: 50px" target="_blank">
                            <span>用户端</span>
                        </a>
                    </li>
                </ul>
            </div>

            <div class="collapse navbar-collapse pull-right" id="bs-example-navbar-collapse-1">
                <!----------------------------------------- 此为未登录时显示内容 ----------------------------------------->
                <ul class="nav navbar-nav admin_head_logout" style="display: none;">
                    <li>
                        <!-- 右上 -->
                        <a class="dropdown-toggle" href="/login" style="height: 50px"
                           data-toggle="modal">
                            <span class="pull-left nav-username">登录</span>
                        </a>
                    </li>
                </ul>
                <!----------------------------------------- 此为未登录时显示内容-end ----------------------------------------->

                <!----------------------------------------- 此为登录时显示内容 ----------------------------------------->
                <ul class="nav navbar-nav admin_head_login" style="display: none;">
                    <li>
                        <!-- 右上 -->
                        <a class="dropdown-toggle" data-toggle="dropdown" href="#" style="height: 50px">
                            <img class="img-circle pull-left img-responsive nav-user-img"
                                 src="${user.userPhoto}"/>
                            <span class="pull-left nav-username">
								管理员-<span class="admin_name"></span>
							</span>
                        </a>

                        <!-- 右上（打开） -->
                        <ul class="dropdown-menu dropdown-menu-right clearfix" style="padding-top: 0px">
                            <li class="user-li-head">
									<span>
										<img class="img-circle nav-user-img-xiala center-block"
                                             src="${user.userPhoto}"/>
									</span>
                                <p></p>
                                <p class="text-center">
									<span>
										管理员 - <span class="admin_name"></span>
									</span>
                                </p>
                                <p class="text-center">
                                    <!-- 创建时间 -->
                                    <small>
                                        <span class="admin_createtime"></span>
                                    </small>
                                </p>
                            </li>
                        </ul>
                    </li>
                </ul>

                <!-- 退出管理员登录 -->
                <ul class="nav navbar-nav admin_head_login" style="display: none;">
                    <li>
                        <!-- 右上 -->
                        <a class="dropdown-toggle" onclick="adminLogout()"
                           style="height: 50px; cursor: pointer;">
                            <span class="pull-left nav-username">退出</span>
                        </a>
                    </li>
                </ul>
                <!----------------------------------------- 此为登录时显示内容-end ----------------------------------------->
            </div>
        </div>
    </nav>
</div>

<script src="/static/js/jquery-3.4.1.js"></script>
<script src="/static/bootstrap/js/bootstrap.js"></script>

<script src="/static/js/common.js"></script>
<script src="/static/js/admin/head.js"></script>
<script src="/static/js/admin/login.js"></script>
</body>
</html>